public class Machine {
    public void checkBag(Goods goods)throws DangerException{
        if(goods.isDanger()){

        }
        else {
            System.out.println(goods.name+ "不是危险品！");
        }
    }
}
